package com.dididoctor.doctor.WYY;

import com.alibaba.fastjson.JSONObject;

/**
 * Created by zhoujianghua on 2015/4/9.
 */
public class GuessAttachment extends CustomAttachment {
    private String messageAttachType;
    private String patientName;
    private String age;
    private String illName;
    private String patientHeadPic;
    private String recId;
    private String suggestion;
    private String suggestionResult;
    private String disId;
    private String sex;

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public GuessAttachment(int type) {
        super(CustomAttachmentType.RTS);
        this.type = type;
    }

    public String getMessageAttachType() {
        return messageAttachType;
    }

    public void setMessageAttachType(String messageAttachType) {
        this.messageAttachType = messageAttachType;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getIllName() {
        return illName;
    }

    public void setIllName(String illName) {
        this.illName = illName;
    }

    public String getPatientHeadPic() {
        return patientHeadPic;
    }

    public void setPatientHeadPic(String patientHeadPic) {
        this.patientHeadPic = patientHeadPic;
    }

    public String getRecId() {
        return recId;
    }

    public void setRecId(String recId) {
        this.recId = recId;
    }

    public String getSuggestion() {
        return suggestion;
    }

    public void setSuggestion(String suggestion) {
        this.suggestion = suggestion;
    }

    public String getSuggestionResult() {
        return suggestionResult;
    }

    public void setSuggestionResult(String suggestionResult) {
        this.suggestionResult = suggestionResult;
    }

    public String getDisId() {
        return disId;
    }

    public void setDisId(String disId) {
        this.disId = disId;
    }


    @Override
    protected void parseData(JSONObject data) {
        patientName = data.get("patientName").toString();
        age = data.get("age").toString();
        illName = data.get("illName").toString();
        patientHeadPic =  data.get("patientHeadPic").toString();
        recId = data.get("recId").toString();
        suggestion = data.get("suggestion").toString();
        suggestionResult = data.get("suggestionResult").toString();
        disId=  data.get("disId").toString();
        messageAttachType =data.get("messageAttachType").toString();
        sex = data.get("sex").toString();
    }

    @Override
    protected JSONObject packData() {
        JSONObject data = new JSONObject();
        data.put("patientName", patientName);
        data.put("age", age);
        data.put("illName", illName);
        data.put("patientHeadPic", patientHeadPic);
        data.put("recId", recId);
        data.put("suggestion", suggestion);
        data.put("suggestionResult", suggestionResult);
        data.put("disId", disId);
        data.put("messageAttachType", messageAttachType);
        data.put("sex",sex);
        return data;
    }
    public GuessAttachment getContent() {
        GuessAttachment cac= new GuessAttachment(CustomAttachmentType.RTS);
        cac.setMessageAttachType(getMessageAttachType());
        cac.setPatientName(getPatientName());
        cac.setAge(getAge());
        return cac;
    }
}
